package com.xvaca.spcms.servlet.admin.partner;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xvaca.spcms.bean.PartnerBean;
import com.xvaca.spcms.dao.PartnerDAO;

/**
 * Servlet implementation class PartnerListServlet
 */
public class PartnerListServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		PartnerDAO dao = new PartnerDAO();
		List<PartnerBean> list = dao.getPartnerList();
		
		request.setAttribute("partners", list);
		request.getRequestDispatcher("partner_list.jsp").forward(request, response);
	}

}
